<!--
@license
Copyright 2021 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<h3>Settings</h3>
<div>
  <div class="reload-toggle">
    <mat-checkbox [checked]="reloadEnabled" (change)="onReloadToggle()"
      >Reload data</mat-checkbox
    >
  </div>
  <div>
    <mat-form-field>
      <mat-label>Reload Period (seconds)</mat-label>
      <input
        class="reload-period"
        matInput
        type="number"
        [formControl]="reloadPeriodControl"
      />
    </mat-form-field>
    <mat-error
      *ngIf="
            reloadPeriodControl.hasError('min') ||
            reloadPeriodControl.hasError('required')
          "
    >
      Reload period has to be minimum of {{ MIN_RELOAD_PERIOD_IN_S }} seconds.
    </mat-error>
  </div>
</div>
<div>
  <mat-form-field subscriptSizing="dynamic">
    <mat-label>Pagination Limit</mat-label>
    <input
      class="page-size"
      matInput
      type="number"
      [formControl]="paginationControl"
    />
  </mat-form-field>
  <mat-error *ngIf="paginationControl.invalid">
    Page size has to be a positive integer.
  </mat-error>
</div>
